<div id="addAttendanceClassesModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-body">
                <h3 class="m-t-none m-b ">
                    <span><vc:i18n name="添加" namespace="addAttendanceClasses"></vc:i18n></span>
                </h3>
                <div class="ibox-content">
                    <div>
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="班次名称" namespace="addAttendanceClasses"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addAttendanceClassesInfo.classesName" type="text" :placeholder="vc.i18n('必填，请填写班次名称','addAttendanceClasses')" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="打卡范围" namespace="addAttendanceClasses"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addAttendanceClassesInfo.timeOffset" type="text" :placeholder="vc.i18n('必填，请填写打卡范围(分钟)','addAttendanceClasses')" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="打卡次数" namespace="addAttendanceClasses"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="addAttendanceClassesInfo.clockCount" @change="_addAttendanceChangeClockCount()">
                                        <option selected disabled value="">{{vc.i18n('必填，请选择打卡次数','addAttendanceClasses')}}</option>
                                        <option value="2">2次</option>
                                        <option value="4">4次</option>
                                        <option value="6">6次</option>
                                    </select>
                                </div>
                            </div>
                            <div v-for="(item,index) in addAttendanceClassesInfo.attrs">
                                <div class="row" v-if="index % 2 == 0">
                                    <div class="col-sm-6">
                                        <div class="form-group row">
                                            <label class="col-sm-4 col-form-label padding-lr-sm">{{item.name}}</label>
                                            <div class="col-sm-8">
                                                <input v-model="item.value" type="text" :placeholder="'必填，请填写'+item.name" class="form-control" :class="item.specCd">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6" v-if="index < addAttendanceClassesInfo.attrs.length-1">
                                        <div class="form-group row">
                                            <label class="col-sm-3 col-form-label padding-lr-sm">{{addAttendanceClassesInfo.attrs[index+1].name}}</label>
                                            <div class="col-sm-9">
                                                <input v-model="addAttendanceClassesInfo.attrs[index+1].value" type="text" :placeholder="'必填，请填写'+addAttendanceClassesInfo.attrs[index+1].name" class="form-control " :class="addAttendanceClassesInfo.attrs[index+1].specCd">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="打卡类型" namespace="addAttendanceClasses"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="addAttendanceClassesInfo.clockType">
                                        <option selected disabled value="">{{vc.i18n('必填，请选择打卡类型','addAttendanceClasses')}}</option>
                                        <option v-for="(item,index) in addAttendanceClassesInfo.clockTypes" :key="index"
                                                v-bind:value="item.statusCd">
                                            {{item.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group row" v-if="addAttendanceClassesInfo.clockType == '1003'">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="打卡规则" namespace="addAttendanceClasses"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="1"><span><vc:i18n name="星期一" namespace="addAttendanceClasses"></vc:i18n></span>
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="2"><span><vc:i18n name="星期二" namespace="addAttendanceClasses"></vc:i18n></span>
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="3"><span><vc:i18n name="星期三" namespace="addAttendanceClasses"></vc:i18n></span>
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="4"><span><vc:i18n name="星期四" namespace="addAttendanceClasses"></vc:i18n></span>
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="5"><span><vc:i18n name="星期五" namespace="addAttendanceClasses"></vc:i18n></span>
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="6"><span><vc:i18n name="星期六" namespace="addAttendanceClasses"></vc:i18n></span>
                                        </label>
                                    </div>
                                    <div class="checkbox custom-control-inline">
                                        <label>
                                            <input type="checkbox" v-model="addAttendanceClassesInfo.clockTypeValues"
                                                   value="7"><span><vc:i18n name="星期日" namespace="addAttendanceClasses"></vc:i18n></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="迟到范围" namespace="addAttendanceClasses"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addAttendanceClassesInfo.leaveOffset" type="text" :placeholder="vc.i18n('必填，请填写迟到范围（分钟）','addAttendanceClasses')" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="早退范围" namespace="addAttendanceClasses"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addAttendanceClassesInfo.lateOffset" type="text" :placeholder="vc.i18n('必填，请填写早退范围（分钟）','addAttendanceClasses')" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="考勤部门" namespace="addAttendanceClasses"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <vc:create path="frame/orgSelect2" parentModal="addAttendanceClassesModel" callBackListener="addAttendanceClasses" callBackFunction="notify" namespace="addAttendanceClasses">
                                            </vc:create>
                                        </div>
                                        <div class="col-sm-6">
                                            <vc:create path="frame/departmentSelect2" parentModal="addAttendanceClassesModel" callBackListener="addAttendanceClasses" callBackFunction="notify" namespace="addAttendanceClasses">
                                            </vc:create>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="ibox-content">
                                <button class="btn btn-primary float-right" type="button" v-on:click="saveAttendanceClassesInfo()">
                                    <i class="fa fa-check"></i>&nbsp;保存
                                </button>
                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">
                                    <i class="fa fa-close"></i>&nbsp;取消
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
